<template>
  <div>
    <el-dialog v-bind="dialogProps" :before-close="handleClose" :close-on-click-modal="false"
               :destroy-on-close="true" fullscreen>
      <template #title>
        <div class="changeTitle">
          <span :style="{color:titleAction==1?'#fff':'#333'}" @click="titleAction=1">{{ dialogProps.title }}</span>
          <span :style="{color:titleAction==2?'#fff':'#333'}" @click="titleAction=2">GIS地图</span>
        </div>
      </template>
      <div v-show="this.titleAction==1">
        <div class="steps">
          <div v-for="(d, i) in showSteps" :key="i" :class="['step', d.stepStatus === 'isNode' ? 'isNode' : '']">
            <img :class="['node', d.stepStatus === 'isNode' ? 'shanshuo' : '']"
                 :src="`${URL}${d.stepName}_${d.stepStatus}.png`">
            <img class="line" :src="`${URL}${d.lineImg}.png`">
            <span class="label">{{ d.processName }}</span>
            <span class="time">{{ d.processDate }}</span>
          </div>
        </div>
        <div class="expand1" :style="{ backgroundImage: `url(${URL}showMore_bg.png)` }" @click="handleExpandAll">{{
            !showAll ? '展开工单信息' : '隐藏工单信息'
          }}
        </div>
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm"
                 size="small">
          <div v-if="showAll">
            <div class="formtop">
              <div class="formcenter">工单基本信息</div>
              <div class="formbottom" v-if="showBasic">
                <el-row gutter="16" justify="start">
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="巡视名称:" prop="taskName">
                      <el-input v-model="ruleForm.taskName" placeholder="无数据" clearable disabled>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="单位名称:" prop="maintainUnitName">
                      <el-input v-model="ruleForm.maintainUnitName" placeholder="无数据" clearable disabled>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="能源站名称:" prop="patrolRoomName">
                      <el-input v-model="ruleForm.patrolRoomName" placeholder="无数据" clearable
                                disabled></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="8">
                    <el-form-item label="巡视对象名称:" prop="patrolTargetNames">
                      <el-input v-model="ruleForm.patrolTargetNames" placeholder="无数据" clearable disabled>
                        <el-checkbox slot="append" v-model="ruleForm.equipAllSelect" clearable disabled>全机房
                        </el-checkbox>
                      </el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="巡视类型:" prop="patrolTypeName">
                      <el-input v-model="ruleForm.patrolTypeName" placeholder="无数据" clearable
                                disabled></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="计划开始时间:" prop="planStartTime">
                      <el-input v-model="ruleForm.planStartTime" placeholder="无数据" clearable disabled>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="计划结束时间:" prop="planEndTime">
                      <el-input v-model="ruleForm.planEndTime" placeholder="无数据" clearable disabled>
                      </el-input>
                    </el-form-item>
                  </el-col>


                  <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                    <el-form-item label="巡视内容:" prop="patrolDescription">
                      <el-input v-model="ruleForm.patrolDescription" placeholder="无数据" clearable
                                disabled type="textarea"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                    <el-form-item label="备注:" prop="remark">
                      <el-input v-model="ruleForm.remark" placeholder="无数据" clearable
                                disabled type="textarea"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
              </div>
            </div>
            <img class="expand_shouqi" :src="`${URL}expand.png`" v-if="!showBasic" @click="showBasic = true">
            <img class="expand_shouqi" :src="`${URL}shouqi.png`" v-if="showBasic" @click="showBasic = false">
          </div>
          <div>
            <div class="formtop">
              <div class="formcenter">接派单信息</div>
              <div class="formbottom" v-if="showPaidan">
                <el-row gutter="16" justify="start">
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="派单人:" prop="sendPersonName">
                      <el-input v-model="ruleForm.sendPersonName" placeholder="无数据" clearable
                                disabled></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="派单人电话:" prop="sendTel">
                      <el-input v-model="ruleForm.sendTel" placeholder="无数据" clearable disabled>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="派单时间:" prop="sendTime">
                      <el-input v-model="ruleForm.sendTime" placeholder="无数据" clearable disabled>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <!-- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                      <el-form-item label="接单班组:" prop="sendTime">
                          <el-input v-model="ruleForm.sendTime" placeholder="无数据" clearable disabled>
                          </el-input>
                      </el-form-item>
                  </el-col> -->
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="接单人:" prop="receiver">
                      <el-input v-model="ruleForm.receiver" placeholder="无数据" clearable disabled>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="接单时间:" prop="patrolTime">
                      <el-input v-model="ruleForm.patrolTime" placeholder="无数据" clearable disabled>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <!-- 占位 -->
                  <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                    <el-form-item label="接单人电话:" prop="receiverTel" v-show="1==2">
                      <el-input v-model="ruleForm.receiverTel" placeholder="无数据" clearable disabled>
                      </el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
              </div>
            </div>
            <img class="expand_shouqi" :src="`${URL}expand.png`" v-if="!showPaidan" @click="showPaidan = true">
            <img class="expand_shouqi" :src="`${URL}shouqi.png`" v-if="showPaidan" @click="showPaidan = false">
          </div>
          <div>
            <div class="formtop">
              <div class="formcenter">接单人认证信息</div>
              <div class="formbottom">
                <div style="display: flex">
                  <div class="textwidth">接单人照片</div>
                  <div style="display: flex">
                    <el-card style="height: 250px;width: 250px;" v-for="items in dialogImageUrlList" :key="items">
                      <el-image :src="items" class="image" :preview-src-list="dialogImageUrlList">
                        <div slot="error" class="image-slot"
                             style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                          <span>暂无照片</span>
                        </div>
                      </el-image>
                      <div style="padding: 14px">
                        <div>
                          <div>姓名：{{ ruleForm.receiver }}</div>
                          <div class="time">认证时间:{{ ruleForm.patrolTime }}</div>

                        </div>
                      </div>
                    </el-card>

                  </div>
                </div>
              </div>
            </div>
            <img class="expand_shouqi" :src="`${URL}expand.png`" v-if="!showRenzheng" @click="showRenzheng = true">
            <img class="expand_shouqi" :src="`${URL}shouqi.png`" v-if="showRenzheng" @click="showRenzheng = false">
          </div>
          <div>
            <div class="formtop">
              <div class="formcenter">现场巡视</div>
              <div class="formbottom" v-if="showXunshi">
                <div style="display: flex">
                  <div class="textwidth">到达现场图片</div>
                  <div style="display: flex">
                    <el-card style="height: 250px;">
                      <el-image :src="sitePictureUrl" class="image" size="208" :preview-src-list="sitePictureUrlList">
                        <div slot="error" class="image-slot"
                             style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                          <span>暂无照片</span>
                        </div>
                      </el-image>
                      <div style="padding: 14px">
                        <span>{{ ruleForm.sceneDescription }}</span>
                        <div>
                          <time class="time">{{ ruleForm.sceneTime }}</time>
                          <div style="display:flex;justify-content: space-between;align-items: center;height: 25px;">
                            <div>{{ ruleForm.scenePersonName }}</div>
                            <!-- <div>
                            <el-button type="text" class="button"
                                @click="handlePictureCardPreview()">放大</el-button>
                            <el-button type="text" class="button"
                                @click="handleDownload(sitePictureUrl)">下载</el-button>
                            </div> -->
                          </div>
                        </div>
                      </div>
                    </el-card>
                  </div>
                </div>
                <div v-if="ruleForm.isClean === '1'" style="display: flex; margin-top: 4px">
                  <div class="textwidth">机房内卫生</div>
                  <div style="display: flex">
                    <el-card v-if="ruleForm.jfDoorwayPictureIds" style="height: 250px;">
                      <el-image :src="jfDoorwayPictureUrl" class="image" :preview-src-list="jfDoorwayPictureUrlList">
                        <div slot="error" class="image-slot"
                             style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                          <span>暂无照片</span>
                        </div>
                      </el-image>
                      <div style="padding: 14px">
                        <div>
                          <time class="time">{{ currentDate }}</time>
                          <div style="display:flex;justify-content: space-between;align-items: center;height: 25px;">
                            <div>机房门口照片</div>
                            <!-- <div>
                            <el-button type="text" class="button"
                                @click="handlePictureCardPreview()">放大</el-button>
                            <el-button type="text" class="button"
                                @click="handleDownload(jfDoorwayPictureUrl)">下载</el-button>
                            </div> -->
                          </div>
                        </div>
                      </div>
                    </el-card>
                    <el-card v-if="ruleForm.jfOverallPictureIds" style="height: 250px;margin-left:5px;">
                      <el-image :src="jfOverallPictureUrl" class="image" :preview-src-list="jfOverallPictureUrlList">
                        <div slot="error" class="image-slot"
                             style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                          <span>暂无照片</span>
                        </div>
                      </el-image>
                      <div style="padding: 14px">
                        <div>
                          <time class="time">{{ currentDate }}</time>
                          <div style="display:flex;justify-content: space-between;align-items: center;height: 25px;">
                            <div>机房内整体照片</div>
                            <!-- <div>
                            <el-button type="text" class="button"
                                @click="handlePictureCardPreview()">放大</el-button>
                            <el-button type="text" class="button"
                                @click="handleDownload(jfOverallPictureUrl)">下载</el-button>
                            </div> -->
                          </div>
                        </div>
                      </div>
                    </el-card>
                    <el-card v-if="ruleForm.jfMajorEquipPictureIds" style="height: 250px;margin-left:5px;">
                      <el-image :src="jfMajorEquipPictureUrl" class="image"
                                :preview-src-list="jfMajorEquipPictureUrlList">
                        <div slot="error" class="image-slot"
                             style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                          <span>暂无照片</span>
                        </div>
                      </el-image>
                      <div style="padding: 14px">
                        <div>
                          <time class="time">{{ currentDate }}</time>
                          <div style="display:flex;justify-content: space-between;align-items: center;height: 25px;">
                            <div>主要设备照片</div>
                            <!-- <div>
                            <el-button type="text" class="button"
                                @click="handlePictureCardPreview()">放大</el-button>
                            <el-button type="text" class="button"
                                @click="handleDownload(jfMajorEquipPictureUrl)">下载</el-button>
                            </div> -->
                          </div>
                        </div>
                      </div>
                    </el-card>
                  </div>
                </div>
                <div v-for="(item,index) in list.data" :key="index">
                  <div style="display: flex; margin-top: 10px">
                    <div class="textwidth">{{ item.equipName }}</div>
                    <div style="display: flex">
                      <el-card v-if="item.qjPictureIds" style="height: 250px;">
                        <el-image :src="item.qjPictureUrl" class="image" :preview-src-list="item.qjPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">全景照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.gnPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.gnPictureUrl" class="image" :preview-src-list="item.gnPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">柜内照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.dbPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.dbPictureUrl" class="image" :preview-src-list="item.dbPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">电表照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.yxbPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.yxbPictureUrl" class="image" :preview-src-list="item.yxbPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">运行泵照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.btfsPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.btfsPictureUrl" class="image" :preview-src-list="item.btfsPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">泵体风扇照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.jzzfqPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.jzzfqPictureUrl" class="image" :preview-src-list="item.jzzfqPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">机组蒸发器冷凝器供回水照片
                          </div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.fmztPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.fmztPictureUrl" class="image" :preview-src-list="item.fmztPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">阀门整体照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.ylbPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.ylbPictureUrl" class="image" :preview-src-list="item.ylbPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">压力表照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.shdjPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.shdjPictureUrl" class="image" :preview-src-list="item.shdjPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">损坏灯具照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.kzmbPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.kzmbPictureUrl" class="image" :preview-src-list="item.kzmbPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">控制面板运行数据照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.sdcsPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.sdcsPictureUrl" class="image" :preview-src-list="item.sdcsPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">设定参数照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.gzbjPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.gzbjPictureUrl" class="image" :preview-src-list="item.gzbjPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">故障报警照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.aqckPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.aqckPictureUrl" class="image" :preview-src-list="item.aqckPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">安全出口标识照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.yjdPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.yjdPictureUrl" class="image" :preview-src-list="item.yjdPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">应急灯照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.dsbPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.dsbPictureUrl" class="image" :preview-src-list="item.dsbPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">挡鼠板照片</div>
                          <!-- <div>
                              <el-button type="text" class="button"
                                  @click="handlePictureCardPreview()">放大</el-button>
                              <el-button type="text" class="button"
                                  @click="handleDownload(file)">下载</el-button>
                          </div> -->
                        </div>
                      </el-card>
                      <el-card v-if="item.nsbPictureIds" style="height: 250px;margin-left: 10px;">
                        <el-image :src="item.nsbPictureUrl" class="image" :preview-src-list="item.nsbPictureList">
                          <div slot="error" class="image-slot"
                               style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                            <span>暂无照片</span>
                          </div>
                        </el-image>
                        <div style="padding: 14px;display:flex;justify-content: space-between;align-items: center;">
                          <div style="width:100px;word-wrap: break-all;word-break: normal;">粘鼠板照片</div>
                          <div>
                            <el-button type="text" class="button"
                                       @click="handlePictureCardPreview()">放大
                            </el-button>
                            <el-button type="text" class="button"
                                       @click="handleDownload(file)">下载
                            </el-button>
                          </div>
                        </div>
                      </el-card>
                    </div>
                  </div>
                  <div v-if="item.ua || item.ub || item.vc || item.ia || item.ib || item.ic"
                       style="display: flex; margin-top: 10px">
                    <div class="textwidth">{{ item.equipName }}运行数据</div>
                    <el-row gutter="16" justify="start">
                      <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
                        <el-form-item label="Ua(V):">
                          <el-input v-model="item.ua" placeholder="无数据" clearable disabled>
                          </el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
                        <el-form-item label="Ub(V):">
                          <el-input v-model="item.ub" placeholder="无数据" clearable disabled>
                          </el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
                        <el-form-item label="Vc(V):">
                          <el-input v-model="item.vc" placeholder="无数据" clearable disabled>
                          </el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
                        <el-form-item label="Ia(A):">
                          <el-input v-model="item.ia" placeholder="无数据" clearable disabled>
                          </el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
                        <el-form-item label="Ib(A):">
                          <el-input v-model="item.ib" placeholder="无数据" clearable disabled>
                          </el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
                        <el-form-item label="Ic(A):">
                          <el-input v-model="item.ic" placeholder="无数据" clearable disabled>
                          </el-input>
                        </el-form-item>
                      </el-col>
                    </el-row>
                  </div>
                </div>
              </div>
            </div>
            <img class="expand_shouqi" :src="`${URL}expand.png`" v-if="!showXunshi" @click="showXunshi = true">
            <img class="expand_shouqi" :src="`${URL}shouqi.png`" v-if="showXunshi" @click="showXunshi = false">
          </div>
          <div v-if="list4.data.length > 0">
            <div class="formtop">
              <div class="formcenter">电量采集信息</div>
              <div class="formbottom" v-if="showDianlian">
                <vxe-table border stripe ref="selectedEquip" height="200" :data="list4.data">
                  <vxe-column type="seq" title="序号" width="60" align="center"></vxe-column>
                  <vxe-column field="unitName" title="单位" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="energySiteName" title="能源站名称" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="powerDistName" title="配电柜名称" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="electricityMeterNo" title="电表编号" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="electricityMeterName" title="电表名称" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="electricityNum" title="电量(kwh)" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="electricityPic" title="电表照片" align="center" minWidth="150">
                    <template v-slot="{ row }">
                      <el-image style="width: 60px; height: 30px;" :src="row.afterPictureSrc"
                                :preview-src-list="row.srcHistoryList" alt="">
                        <div slot="error" class="image-slot" style="width: 100%;height: 100%;text-align: center;">
                          <span>暂无照片</span>
                        </div>
                      </el-image>
                    </template>
                  </vxe-column>
                </vxe-table>
              </div>
            </div>
            <img class="expand_shouqi" :src="`${URL}expand.png`" v-if="!showDianlian" @click="showDianlian = true">
            <img class="expand_shouqi" :src="`${URL}shouqi.png`" v-if="showDianlian" @click="showDianlian = false">
          </div>
          <div>
            <div class="formtop">
              <div class="formcenter">缺陷信息</div>
              <div class="formbottom" v-if="showQuexian">
                <vxe-table border stripe ref="selectedEquip" height="200" :data="list1.data">
                  <vxe-column type="seq" title="序号" width="60" align="center"></vxe-column>
                  <vxe-column v-if="row.ptaskStatusNo === '30' ? true : false" field="defectStatusCode" align="center"
                              title="审核" minWidth="180">
                    <template v-slot="{ row }">
                      <el-row>
                        <el-button :type="row.defectStatusCode === '1'&& row.equipDefectType=='1' ?'primary':'info'"
                                   :disabled="row.defectStatusCode === '1' && row.equipDefectType=='1' ?false:true"
                                   size="mini" @click="handleClick(row, 1)">通过
                        </el-button>
                        <el-button :type="row.defectStatusCode === '1'&& row.equipDefectType=='1' ?'primary':'info'"
                                   :disabled="row.defectStatusCode === '1'&& row.equipDefectType=='1' ?false:true"
                                   size="mini" @click="handleClick(row, 2)">不通过
                        </el-button>
                      </el-row>
                    </template>
                  </vxe-column>
                  <vxe-column field="defectStatusName" title="审核情况" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="unitName" title="单位" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="equipName" title="设备名称" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="equipNo" title="出厂编码" align="center" minWidth="180">
                  </vxe-column>
                  <vxe-column field="equipTypeName" title="设备类型" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectName" title="缺陷名称" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectAddress" title="缺陷地点" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectParts" title="缺陷部位" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectDescription" title="缺陷描述" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="creatTime" title="发现日期" align="center" minWidth="180">
                  </vxe-column>
                  <vxe-column field="isHandle" title="是否已处理" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="sitePictureIds" title="处理后照片" align="center" minWidth="150">
                    <template v-slot="{ row }">
                      <el-image style="width: 60px; height: 30px;margin-right: 5px;"
                                v-for="items in row.sitePictureIdsList" :key="items" :src="items"
                                :preview-src-list="row.sitePictureIdsList" alt="">
                        <div slot="error" class="image-slot" style="width: 100%;height: 100%;text-align: center;">
                          <span>暂无照片</span>
                        </div>
                      </el-image>
                    </template>
                  </vxe-column>
                </vxe-table>
              </div>
            </div>
            <img class="expand_shouqi" :src="`${URL}expand.png`" v-if="!showQuexian" @click="showQuexian = true">
            <img class="expand_shouqi" :src="`${URL}shouqi.png`" v-if="showQuexian" @click="showQuexian = false">
          </div>
          <div>
            <div class="formtop">
              <div class="formcenter">隐患信息</div>
              <div class="formbottom" v-if="showYinhuan">
                <vxe-table border stripe ref="selectedEquip" height="200" :data="list2.data">
                  <vxe-column type="seq" title="序号" width="60" align="center"></vxe-column>
                  <vxe-column v-if="row.ptaskStatusNo === '30' ? true : false" field="defectStatusCode" align="center"
                              title="审核" minWidth="180">
                    <template v-slot="{ row }">
                      <el-row>
                        <el-button :type="row.defectStatusCode === '1'&& row.equipDefectType=='2' ?'primary':'info'"
                                   :disabled="row.defectStatusCode === '1' && row.equipDefectType=='2'?false:true"
                                   size="mini" @click="handleClick(row, 1)">通过
                        </el-button>
                        <el-button :type="row.defectStatusCode === '1'&& row.equipDefectType=='2' ?'primary':'info'"
                                   :disabled="row.defectStatusCode === '1' && row.equipDefectType=='2'?false:true"
                                   size="mini" @click="handleClick(row, 2)">不通过
                        </el-button>
                      </el-row>
                    </template>
                  </vxe-column>
                  <vxe-column field="defectStatusName" title="审核情况" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="unitName" title="单位" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="equipName" title="设备名称" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="equipNo" title="出厂编码" align="center" minWidth="180">
                  </vxe-column>
                  <vxe-column field="equipTypeName" title="设备类型" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectName" title="隐患名称" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectAddress" title="隐患地点" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectParts" title="隐患部位" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectDescription" title="隐患描述" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="creatTime" title="发现日期" align="center" minWidth="180">
                  </vxe-column>
                  <vxe-column field="isHandle" title="是否已处理" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="sitePictureIds" title="处理后照片" align="center" minWidth="150">
                    <template v-slot="{ row }">
                      <el-image style="width: 60px; height: 30px;margin-right: 5px;"
                                v-for="items in row.sitePictureIdsList" :key="items" :src="items"
                                :preview-src-list="row.sitePictureIdsList" alt="">
                        <div slot="error" class="image-slot" style="width: 100%;height: 100%;text-align: center;">
                          <span>暂无照片</span>
                        </div>
                      </el-image>
                    </template>
                  </vxe-column>
                </vxe-table>
              </div>
            </div>
            <img class="expand_shouqi" :src="`${URL}expand.png`" v-if="!showYinhuan" @click="showYinhuan = true">
            <img class="expand_shouqi" :src="`${URL}shouqi.png`" v-if="showYinhuan" @click="showYinhuan = false">
          </div>
          <div>
            <div class="formtop">
              <div class="formcenter">历史缺陷隐患信息</div>
              <div class="formbottom" v-if="showHistory">
                <vxe-table border stripe ref="selectedEquip" height="200" :data="list3.data">
                  <vxe-column type="seq" title="序号" width="60" align="center"></vxe-column>
                  <vxe-column field="unitName" title="单位" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectName" title="出厂编码" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectName" title="设备名称" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectParts" title="缺陷隐患部位" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectName" title="缺陷隐患名称" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectAddress" title="缺陷隐患地点" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectDescription" title="缺陷隐患描述" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="creatTime" title="发现日期" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="defectPictureIds" title="缺陷隐患照片" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="equipDefectTypeName" title="问题分类" align="center" minWidth="150">
                  </vxe-column>
                  <vxe-column field="isExit" title="问题是否存在" align="center" minWidth="150">
                    <template v-slot="{ row }">
                      <el-row>
                        <span v-if="row.isExit === '1'">存在</span>
                        <span v-if="row.isExit === '2'">不存在</span>
                      </el-row>
                    </template>
                  </vxe-column>
                  <vxe-column field="isHandle" title="现场是否处理" align="center" minWidth="150">
                    <template v-slot="{ row }">
                      <el-row>
                        <span v-if="row.isHandle === '1'">已处理</span>
                        <span v-if="row.isHandle === '0'">未处理</span>
                      </el-row>
                    </template>
                  </vxe-column>
                  <vxe-column field="afterPictureIds" title="处理后照片" align="center" minWidth="150">
                    <template v-slot="{ row }">
                      <el-image style="width: 60px; height: 30px;" :src="row.afterPictureSrc"
                                :preview-src-list="row.srcHistoryList" alt="">
                        <div slot="error" class="image-slot"
                             style="width: 100%;height: 100%;text-align: center;line-height: 150px;">
                          <span>暂无照片</span>
                        </div>
                      </el-image>
                    </template>
                  </vxe-column>
                </vxe-table>
              </div>
            </div>
            <img class="expand_shouqi" :src="`${URL}expand.png`" v-if="!showHistory" @click="showHistory = true">
            <img class="expand_shouqi" :src="`${URL}shouqi.png`" v-if="showHistory" @click="showHistory = false">
          </div>
          <div>
            <div class="formtop">
              <div class="formcenter">结论报告</div>
              <div class="formbottom" v-if="showJielun">
                <el-row gutter="16" justify="start">
                  <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                    <el-form-item label="结论：" prop="patrolConclusion">
                      <el-input v-model="ruleForm.patrolConclusion" clearable
                                disabled type="textarea"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                    <el-form-item label="备注：" prop="xsEndRemark">
                      <el-input v-model="ruleForm.xsEndRemark" clearable
                                disabled type="textarea"></el-input>
                    </el-form-item>
                  </el-col>

                </el-row>
              </div>
            </div>
            <img class="expand_shouqi" :src="`${URL}expand.png`" v-if="!showJielun" @click="showJielun = true">
            <img class="expand_shouqi" :src="`${URL}shouqi.png`" v-if="showJielun" @click="showJielun = false">
          </div>
          <div>
            <div class="formtop">
              <div class="formcenter">工单规范性评价</div>
              <div class="formbottom" v-if="showPingjia">
                <el-row gutter="16" justify="start">
                  <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
                    <el-form-item v-if="isDisabled" label="评价结论:" prop="appraiseStatusName">
                      <el-input v-model="ruleForm.appraiseStatusName" placeholder="无数据" clearable
                                :disabled="isDisabled"></el-input>
                    </el-form-item>
                    <el-form-item v-if="!isDisabled" label="评价结论:" prop="appraiseStatus">
                      <el-select v-model="ruleForm.appraiseStatus" placeholder="请选择评价结论" clearable
                                 style="width: 100%" @change="appraiseStatusChange">
                        <el-option v-for="item in appraiseStatusOptions" :key="item.value" :label="item.label"
                                   :value="item.value">
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
                    <el-form-item label="评价人:" prop="appraisePersonName">
                      <el-input v-model="ruleForm.appraisePersonName" placeholder="无数据" clearable
                                :disabled="isDisabled"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
                    <el-form-item label="评价时间:" prop="appraiseTime">
                      <el-input v-model="ruleForm.appraiseTime" placeholder="无数据" clearable
                                :disabled="isDisabled"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                    <el-form-item v-show="!appraiseContentShow" label="评价说明:" prop="appraiseContent">
                      <el-input v-model="ruleForm.appraiseContent" placeholder="无数据" clearable
                                :disabled="isDisabled" type="textarea"></el-input>
                    </el-form-item>
                    <el-form-item v-show="appraiseContentShow" label="评价说明:">
                      <el-input v-model="ruleForm.appraiseContent" placeholder="无数据" clearable
                                :disabled="isDisabled" type="textarea"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
              </div>
            </div>
            <img class="expand_shouqi" :src="`${URL}expand.png`" v-if="!showPingjia" @click="showPingjia = true">
            <img class="expand_shouqi" :src="`${URL}shouqi.png`" v-if="showPingjia" @click="showPingjia = false">
          </div>
        </el-form>
        <span v-if="!isDisabled" slot="footer" class="dialog-footer">
                <el-button @click="handleCancel()" :size="size" icon="fa fa-minus-square-o">取消</el-button>
                <el-button type="primary" @click="handleSubmit()" :size="size"
                           icon="fa fa-save (alias)">确定</el-button>
            </span>
      </div>
      <div v-if="titleAction==2">
        <div>
          <div style="height:800px;width: 100%;">
            <!--            <thgis-map-->
            <!--              v-if="gisConfig.maptype"-->
            <!--              v-bind="gisConfig"-->


            <!--              @mapLoaded="mapLoaded"-->
            <!--            >-->
            <!--              &lt;!&ndash;   :center="[116.30817983736284, 39.84946036621202]" &ndash;&gt;-->
            <!--            </thgis-map>-->
            <!--            <thgis-track @trackClose="trackClose"></thgis-track>-->
          </div>
        </div>
      </div>
      <PhoneVivew v-if="photoInfo.visible" :photoInfo="photoInfo"></PhoneVivew>
    </el-dialog>
  </div>
</template>
<script>
import {workOrderModelForm} from "../model/electricityCollection";
import {workOrderManagement} from '@/api/patrol/workOrderManagement.js'
import PhoneVivew from "./PhoneView.vue"
import {getInfo} from "@/api/login";
import moment from "moment";

export default {
  components: {PhoneVivew},
  data() {
    return {
      gisConfig: {},
      photoInfo: {
        visible: false,
        photos: [
          {src: 'https://poi-pic-gz.cdn.bcebos.com/pic_f7b1a5e7b50dbc253a34d611d26fe7fd.jpg', desc: '我是第1张照片'},
        ],
        defaultIndex: 0
      },
      titleAction: 1,
      showHistoryPhone: [],
      srcHistoryList: [],
      appraiseContentShow: false,
      showBox: true,
      dialogProps: {
        visible: false,
        title: "过程监视",
        top: '5px',
        class: 'monitor-dialog-container',
        // width: '70%'
      },
      size: "medium",
      ruleForm: workOrderModelForm.FormData,
      rules: workOrderModelForm.rules,
      row: {},
      showSteps: [],
      steps: [
        {
          isNode: 1,
          isActive: 1,
          processDate: '2017-12-11 14：01',
          processName: '任务编制',
          code: '1',
          stepName: 'bianzhi',
          stepStatus: 'already',
          lineImg: 'buzhou1'
        },
        {
          isNode: 0,
          isActive: 0,
          processDate: '2017-12-11 14：01',
          processName: '派单',
          code: '2',
          stepName: 'paidan',
          stepStatus: 'already',
          lineImg: 'buzhou2'
        },
        {
          isNode: 0,
          isActive: 0,
          processDate: '2017-12-11 14：01',
          processName: '接单',
          code: '3',
          stepName: 'jiedan',
          stepStatus: 'isNode',
          lineImg: 'buzhou6'
        },
        {
          isNode: 0,
          isActive: 0,
          processDate: '2017-12-11 14：01',
          processName: '开始检测',
          code: '4',
          stepName: 'jiance',
          stepStatus: 'not',
          lineImg: 'buzhou7'
        },
        {
          isNode: 0,
          isActive: 0,
          processDate: '2017-12-11 14：01',
          processName: '工单规范性评价',
          code: '5',
          stepName: 'pingjia',
          stepStatus: 'not',
          lineImg: 'buzhou7'
        },
        {
          isNode: 0,
          isActive: 0,
          processDate: '',
          processName: '归档',
          code: '7',
          stepName: 'guidang',
          stepStatus: 'not',
          lineImg: 'buzhou3'
        }
      ],
      isDisabled: true,
      appraiseStatusOptions: [{label: '合格', value: '1'}, {label: '不合格', value: '2'},],
      list: {
        data: []
      },
      list1: {
        data: []
      },
      list2: {
        data: []
      },
      list3: {
        data: []
      },
      list4: {
        data: []
      },
      authPictureUrl: "",
      dialogImageUrl: "",
      sitePictureUrl: "",
      sitePictureUrlList: [],
      jfDoorwayPictureUrl: "",
      jfDoorwayPictureUrlList: [],
      jfOverallPictureUrl: "",
      jfOverallPictureUrlList: [],
      jfMajorEquipPictureUrl: "",
      jfMajorEquipPictureUrlList: [],
      dialogImageUrlList: [],
      currentDate: '2022-9-9 10:10:00',
      showAll: true,
      showPaidan: true,
      showBasic: true,
      showRenzheng: true,
      showXunshi: true,
      showQuexian: true,
      showDianlian: true,
      showYinhuan: true,
      showHistory: true,
      showJielun: true,
      showPingjia: true,
      activeSteps: ''
    };
  },
  mounted() {

  },
  methods: {
    equipLocation() {
      const zbdata = []
      let isfrom
      workOrderManagement.getTaskEquipList(this.row.taskNo).then(res => {
        let data = res.data
        isfrom = data[0].zb
        data.forEach((item) => {
          zbdata.push(
            {
              shape: item.zb,
              name: item.equipName,
              ccbm: item.ccbm,
              iconsize: [24, 24],
              attribute: {}
            }
          )
        })
        isfrom = isfrom.split(',')[0].split('.')[0].length > 3 ? 0 : 1
        const options = {
          ishit: 0,
          istotop: true,
          istransform: 0,
          istoheat: 0
        }
        const events = {
          //   mouseover:(attr,coor)=>this.equipEvent(attr),
          mouseover: (attr, coor) => {
            const item = []
            item.push(attr.shape.split(',')[0])
            item.push(attr.shape.split(',')[1])
            ThgisPopup.addPopupInfo(item, "<div class=equipClass>" + '设备名称:' + attr.name + " " + " " + "</div>" + "<div class=equipClass>" + '出厂编码:' + attr.ccbm + "</div>")
            // '<p class="goods-name small-text-style">' + resGoodsInfo.goodsName + '</p>' +
          }
        }
        const rs = ThgisLocation.locationMarkerGeometry(null, zbdata, events, options)

      })
    },
    location() {
      const datas = [
        {
          shape: this.row.receivingCoordinate,
          name: '接单坐标',
          iconsrc: './static/image/accept.png',
          iconsize: [25, 50],
          attribute: {}
        },
        {
          shape: this.row.sceneCoordinate,
          name: '到达现场坐标',
          iconsrc: './static/image/arrive.png',
          iconsize: [25, 50],
          attribute: {}
        },
        {
          shape: this.row.patrolCoordinate,
          name: '巡视认证坐标',
          iconsrc: './static/image/prospecting.png',
          iconsize: [25, 50],
          attribute: {}
        },
        {
          shape: this.row.aendCoordinate,
          name: '完成坐标',
          iconsrc: './static/image/finish.png',
          iconsize: [25, 50],
          attribute: {}
        },
      ]
      //注册事件
      const events = {
        click: (attr, coor) => this.selectItem(attr)
      }
      let isfrom = this.row.receivingCoordinate.split(',')[0].split('.')[0].length > 3 ? 0 : 1
      //样式控制
      const options = {
        ishit: 0,
        istotop: true,
        istransform: 1,
        istoheat: 0
      }
      const rs = ThgisLocation.locationMarkerGeometry(null, datas, events, options)
    },
    selectItem(attr) {
      const item = attr;

      let phone = []
      this.photoInfo.photos = []
      if (attr.name == '到达现场坐标') {
        this.photoInfo.visible = true;
        phone = this.row.sitePictureIds.split(',')
        phone.forEach((item, index) => {
          this.photoInfo.photos.push({
            src: this.udsImageUrl + item + "/user.png",
            desc: "第" + (index + 1) + "   图片"
          })
        })
      } else if (attr.name == '巡视认证坐标') {
        this.photoInfo.visible = true;
        phone = this.row.authPictureIds.split(',')
        phone.forEach((item, index) => {
          this.photoInfo.photos.push({
            src: this.udsImageUrl + item + "/user.png",
            desc: "第" + (index + 1) + "   图片"
          })
        })
      } else {
        this.$message({
          message: '此节点暂无照片',
          type: 'warning'
        });
      }
      // this.phoneInfo.phone =
      ThgisPopup.addPopupInfo(item.shape, "<div id='info' style='width:520px;height:400px;margin-top: 20px;'></div>")
      const GdinfoTemp = Vue.component(
        'PhoneVivew',
        PhoneVivew
      )
      //组件内部需要的数据
      const datas = {item: {type: Object, default: () => item}}
      new GdinfoTemp({
        props: datas,
      }).$mount('#info')
    },
    parseTime(time, cFormat) {
      if (arguments.length === 0) {
        return null
      }
      const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
      let date
      if (typeof time === 'object') {
        date = time
      } else {
        if (('' + time).length === 10) time = parseInt(time) * 1000
        date = new Date(time)
      }
      const formatObj = {
        y: date.getFullYear(),
        m: date.getMonth() + 1,
        d: date.getDate(),
        h: date.getHours(),
        i: date.getMinutes(),
        s: date.getSeconds(),
        a: date.getDay()
      }
      const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
        let value = formatObj[key]
        // Note: getDay() returns 0 on Sunday
        if (key === 'a') {
          return ['日', '一', '二', '三', '四', '五', '六'][value]
        }
        if (result.length > 0 && value < 10) {
          value = '0' + value
        }
        return value || 0
      })
      return time_str
    },
    sendService() {

      //展示的轨迹
      let startTime = ""
      let endTime = ""
      let time = new Date()
      console.log(this.row.aendTime)
      endTime = this.row.aendTime || this.parseTime(time)
      startTime = this.row.receiverTime
      let data = {
        endTime: endTime || '2023-01-10 01:19:28',
        startTime: startTime || '2023-01-04 19:15:37',
        yhid: 'yhid:' + this.row.receiverId
      }
      // workOrderManagement.gettrackList(data).then(res =>{
      workOrderManagement.gettrackList(data).then(res => {
        let gpsDatas = res.data
        //    console.log("1111",res)
        const pathcontent = {
          attribute: {
            startdate: this.row.receiverTime || '2020/07/06 12:00:01', //接单时间
            enddate: this.row.sceneTime || '2020/07/06 14:00:01', //到达现场时间
            startLabel: '接单时间',
            acceptPerson: this.row.receiver || '张三'    //接单人
          },
          pathdatas: [],
          closeBtn: false,
          startAndEndVisable: false,
          speedPosition: 'right',

          click:
            () => {
              console.info('我去去去去')
            }
        }
        pathcontent.pathdatas = gpsDatas.map(v => {
          return {shape: v.zb}
        })
        //轨迹
        new TrackVo().trackPoints = pathcontent
      })

    },
    //二级页面弹窗初始化
    showDialog(row, isDisabled) {
      // this.row = row.row
      this.dialogProps.visible = true;
      this.dialogImageUrlList = []
      this.$nextTick(() => {


        this.dialogProps.visible = true;
        workOrderManagement.getById(row.row.taskId).then(res => {
          this.row = res.data[0]
          for (let key in this.ruleForm) {
            this.ruleForm[key] = this.row[key];
          }

          this.fetchProcess()
          workOrderManagement.getTaskEquipList(this.row.taskNo).then(res => {
            this.ruleForm.equipList = res.data
          })
          this.getTable()
          if (isDisabled) {
            this.appraiseContentShow = false
            this.isDisabled = false
            getInfo().then(res => {
              this.ruleForm.appraisePersonName = res.data.nickName
              this.ruleForm.appraisePersonId = res.data.userId
              this.ruleForm.appraiseTime = moment().format("YYYY-MM-DD HH:mm:ss")
            })
          } else {
            this.isDisabled = true
            this.appraiseContentShow = true
          }

          if (this.ruleForm.authPictureIds && this.ruleForm.authPictureIds.length > 10) {

            if (this.ruleForm.authPictureIds.indexOf(',') !== -1) {
              var arr = this.ruleForm.authPictureIds.split(',')

              arr.map(item => {
                if (item.startsWith("https")) {
                  item = item;
                } else {
                  item = this.udsImageUrl + item + "/user.png"
                }
                this.dialogImageUrlList.push(item)
              })
            } else {
              if (this.ruleForm.authPictureIds.startsWith("https")) {
                this.dialogImageUrlList.push(this.ruleForm.authPictureIds);
              }
            }
          }
          if (this.ruleForm.sitePictureIds && this.ruleForm.sitePictureIds.length > 10) {
            this.sitePictureUrlList = []
            if (this.ruleForm.sitePictureIds.indexOf(',') !== -1) {
              var arr = this.ruleForm.sitePictureIds.split(',')
              if (arr[0].startsWith("https")) {
                this.sitePictureUrl = arr[0];
              }
              arr.map(item => {
                if (item.startsWith("https")) {
                  item = item;
                }
                this.sitePictureUrlList.push(item)
              })
            } else {
              if (this.ruleForm.sitePictureIds.startsWith("https")) {
                this.sitePictureUrl = this.ruleForm.sitePictureIds;
              }
              this.sitePictureUrlList.push(this.sitePictureUrl)
            }
          }
          if (this.ruleForm.jfDoorwayPictureIds && this.ruleForm.jfDoorwayPictureIds.length > 10) {
            this.jfDoorwayPictureUrlList = []
            if (this.ruleForm.jfDoorwayPictureIds.indexOf(',') !== -1) {
              var arr = this.ruleForm.jfDoorwayPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                this.jfDoorwayPictureUrl = arr[0];
              }
              arr.map(item => {
                if (item.startsWith("https")) {
                  item = item;
                }
                this.jfDoorwayPictureUrlList.push(item)
              })
            } else {
              if (this.ruleForm.jfDoorwayPictureIds.startsWith("https")) {
                this.jfDoorwayPictureUrl = this.ruleForm.jfDoorwayPictureIds;
              }
              this.jfDoorwayPictureUrlList.push(this.jfDoorwayPictureUrl)
            }
          }
          if (this.ruleForm.jfOverallPictureIds && this.ruleForm.jfOverallPictureIds.length > 10) {
            this.jfOverallPictureUrlList = []
            if (this.ruleForm.jfOverallPictureIds.indexOf(',') !== -1) {
              var arr = this.ruleForm.jfOverallPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                this.jfOverallPictureUrl = arr[0];
              }
              arr.map(item => {
                if (item.startsWith("https")) {
                  item = item;
                }
                this.jfOverallPictureUrlList.push(item)
              })
            } else {
              if (this.ruleForm.jfOverallPictureIds.startsWith("https")) {
                this.jfOverallPictureUrl = this.ruleForm.jfOverallPictureIds;
              }
              this.jfOverallPictureUrlList.push(this.jfOverallPictureUrl)
            }
          }
          if (this.ruleForm.jfMajorEquipPictureIds && this.ruleForm.jfMajorEquipPictureIds.length > 10) {
            this.jfMajorEquipPictureUrlList = []
            if (this.ruleForm.jfMajorEquipPictureIds.indexOf(',') !== -1) {
              var arr = this.ruleForm.jfMajorEquipPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                this.jfMajorEquipPictureUrl = arr[0];
              }
              arr.map(item => {
                if (item.startsWith("https")) {
                  item = item;
                }
                this.jfMajorEquipPictureUrlList.push(item)
              })
            } else {
              if (this.ruleForm.jfMajorEquipPictureIds.startsWith("https")) {
                this.jfMajorEquipPictureUrl = this.ruleForm.jfMajorEquipPictureIds;
              }
              this.jfMajorEquipPictureUrlList.push(this.jfMajorEquipPictureUrl)
            }
          }
        })

      })
    },

    showMsg() {
      if (this.showBox) {
        this.showBox = false
      } else {
        this.showBox = true
      }
    },
    handleExpandAll() {
      if (!this.showAll) {
        this.showPaidan = false

      }
      this.showAll = !this.showAll
    },
    fetchProcess() {
      workOrderManagement.getTaskOperateList(this.row.taskNo).then(res => {
        this.activeSteps = res.data.activeSteps
        this.showSteps = res.data.operateVoList.map((d, i) => {
          const item = this.steps.find(b => b.code === d.code)
          d.stepName = item.stepName
          d.stepStatus = d.isNode ? 'isNode' : d.isActive ? 'already' : 'not'
          if (i === 0) {
            d.lineImg = d.isNode ? 'buzhou5' : d.isActive ? 'buzhou1' : 'buzhou4'
          } else if (i === (res.data.operateVoList.length - 1)) {
            d.lineImg = d.isNode ? 'buzhou9' : d.isActive ? 'buzhou8' : 'buzhou3'
          } else {
            d.lineImg = d.isNode ? 'buzhou6' : d.isActive ? 'buzhou2' : 'buzhou7'
          }
          return d
        })
      })
    },
    getTable() {
      workOrderManagement.getTaskEquipList(this.row.taskNo).then(res => {
        this.list.data = []
        res.data.map(item => {
          // 配电柜
          // 全景照片
          if (item.qjPictureIds && item.qjPictureIds.length > 10) {
            item.qjPictureList = []
            if (item.qjPictureIds.indexOf(',') !== -1) {
              var arr = item.qjPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.qjPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.qjPictureList.push(des)
              })
            } else {
              if (item.qjPictureIds.startsWith("https")) {
                item.qjPictureUrl = item.qjPictureIds;
              }
              item.qjPictureList.push(item.qjPictureUrl)
            }
          }
          // 柜内照片
          if (item.gnPictureIds && item.gnPictureIds.length > 10) {
            item.gnPictureList = []
            if (item.gnPictureIds.indexOf(',') !== -1) {
              var arr = item.gnPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.gnPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.gnPictureList.push(des)
              })
            } else {
              if (item.gnPictureIds.startsWith("https")) {
                item.gnPictureUrl = item.gnPictureIds;
              }
              item.gnPictureList.push(item.gnPictureUrl)
            }
          }
          // 电表照片
          if (item.dbPictureIds && item.dbPictureIds.length > 10) {
            item.dbPictureList = []
            if (item.dbPictureIds.indexOf(',') !== -1) {
              var arr = item.dbPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.dbPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.dbPictureList.push(des)
              })
            } else {
              if (item.dbPictureIds.startsWith("https")) {
                item.dbPictureUrl = item.dbPictureIds;
              }
              item.dbPictureList.push(item.dbPictureUrl)
            }
          }
          // 循环泵
          // 运行泵照片
          if (item.yxbPictureIds && item.yxbPictureIds.length > 10) {
            item.yxbPictureList = []
            if (item.yxbPictureIds.indexOf(',') !== -1) {
              var arr = item.yxbPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.yxbPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.yxbPictureList.push(des)
              })
            } else {
              if (item.yxbPictureIds.startsWith("https")) {
                item.yxbPictureUrl = item.yxbPictureIds;
              }
              item.yxbPictureList.push(item.yxbPictureUrl)
            }
          }
          // 泵体风扇
          if (item.btfsPictureIds && item.btfsPictureIds.length > 10) {
            item.btfsPictureList = []
            if (item.btfsPictureIds.indexOf(',') !== -1) {
              var arr = item.btfsPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.btfsPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.btfsPictureList.push(des)
              })
            } else {
              if (item.btfsPictureIds.startsWith("https")) {
                item.btfsPictureUrl = item.btfsPictureIds;
              }
              item.btfsPictureList.push(item.btfsPictureUrl)
            }
          }
          // 设备管道
          // 机组蒸发器冷凝器供回水
          if (item.jzzfqPictureIds && item.jzzfqPictureIds.length > 10) {
            item.jzzfqPictureList = []
            if (item.jzzfqPictureIds.indexOf(',') !== -1) {
              var arr = item.jzzfqPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.jzzfqPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.jzzfqPictureList.push(des)
              })
            } else {
              if (item.jzzfqPictureIds.startsWith("https")) {
                item.jzzfqPictureUrl = item.jzzfqPictureIds;
              }
              item.jzzfqPictureList.push(item.jzzfqPictureUrl)
            }
          }
          // 阀门整体
          if (item.fmztPictureIds && item.fmztPictureIds.length > 10) {
            item.fmztPictureList = []
            if (item.fmztPictureIds.indexOf(',') !== -1) {
              var arr = item.fmztPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.fmztPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.fmztPictureList.push(des)
              })
            } else {
              if (item.fmztPictureIds.startsWith("https")) {
                item.fmztPictureUrl = item.fmztPictureIds;
              }
              item.fmztPictureList.push(item.fmztPictureUrl)
            }
          }
          // 压力表
          if (item.ylbPictureIds && item.ylbPictureIds.length > 10) {
            item.ylbPictureList = []
            if (item.ylbPictureIds.indexOf(',') !== -1) {
              var arr = item.ylbPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.ylbPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.ylbPictureList.push(des)
              })
            } else {
              if (item.ylbPictureIds.startsWith("https")) {
                item.ylbPictureUrl = item.ylbPictureIds;
              }
              item.ylbPictureList.push(item.ylbPictureUrl)
            }
          }
          // 照明灯具
          // 损坏灯具
          if (item.shdjPictureIds && item.shdjPictureIds.length > 10) {
            item.shdjPictureList = []
            if (item.shdjPictureIds.indexOf(',') !== -1) {
              var arr = item.shdjPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.shdjPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.shdjPictureList.push(des)
              })
            } else {
              if (item.shdjPictureIds.startsWith("https")) {
                item.shdjPictureUrl = item.shdjPictureIds;
              }
              item.shdjPictureList.push(item.shdjPictureUrl)
            }
          }
          // 制冷（热）机组
          // 控制面板运行数据
          if (item.kzmbPictureIds && item.kzmbPictureIds.length > 10) {
            item.kzmbPictureList = []
            if (item.kzmbPictureIds.indexOf(',') !== -1) {
              var arr = item.kzmbPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.kzmbPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.kzmbPictureList.push(des)
              })
            } else {
              if (item.kzmbPictureIds.startsWith("https")) {
                item.kzmbPictureUrl = item.kzmbPictureIds;
              }
              item.kzmbPictureList.push(item.kzmbPictureUrl)
            }
          }
          // 设定参数
          if (item.sdcsPictureIds && item.sdcsPictureIds.length > 10) {
            item.sdcsPictureList = []
            if (item.sdcsPictureIds.indexOf(',') !== -1) {
              var arr = item.sdcsPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.sdcsPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.sdcsPictureList.push(des)
              })
            } else {
              if (item.sdcsPictureIds.startsWith("https")) {
                item.sdcsPictureUrl = item.sdcsPictureIds;
              }
              item.sdcsPictureList.push(item.sdcsPictureUrl)
            }
          }
          // 故障报警
          if (item.gzbjPictureIds && item.gzbjPictureIds.length > 10) {
            item.gzbjPictureList = []
            if (item.gzbjPictureIds.indexOf(',') !== -1) {
              var arr = item.gzbjPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.gzbjPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.gzbjPictureList.push(des)
              })
            } else {
              if (item.gzbjPictureIds.startsWith("https")) {
                item.gzbjPictureUrl = item.gzbjPictureIds;
              }
              item.gzbjPictureList.push(item.gzbjPictureUrl)
            }
          }
          // 安全器材
          // 安全出口标识
          if (item.aqckPictureIds && item.aqckPictureIds.length > 10) {
            item.aqckPictureList = []
            if (item.aqckPictureIds.indexOf(',') !== -1) {
              var arr = item.aqckPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.aqckPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.aqckPictureList.push(des)
              })
            } else {
              if (item.aqckPictureIds.startsWith("https")) {
                item.aqckPictureUrl = item.aqckPictureIds;
              }
              item.aqckPictureList.push(item.aqckPictureUrl)
            }
          }
          // 应急灯
          if (item.yjdPictureIds && item.yjdPictureIds.length > 10) {
            item.yjdPictureList = []
            if (item.yjdPictureIds.indexOf(',') !== -1) {
              var arr = item.yjdPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.yjdPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.yjdPictureList.push(des)
              })
            } else {
              if (item.yjdPictureIds.startsWith("https")) {
                item.yjdPictureUrl = item.yjdPictureIds;
              }
              item.yjdPictureList.push(item.yjdPictureUrl)
            }
          }
          // 挡鼠板
          if (item.dsbPictureIds && item.dsbPictureIds.length > 10) {
            item.dsbPictureList = []
            if (item.dsbPictureIds.indexOf(',') !== -1) {
              var arr = item.dsbPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.dsbPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.dsbPictureList.push(des)
              })
            } else {
              if (item.dsbPictureIds.startsWith("https")) {
                item.dsbPictureUrl = item.dsbPictureIds;
              }
              item.dsbPictureList.push(item.dsbPictureUrl)
            }
          }
          // 粘鼠板
          if (item.nsbPictureIds && item.nsbPictureIds.length > 10) {
            item.nsbPictureList = []
            if (item.nsbPictureIds.indexOf(',') !== -1) {
              var arr = item.nsbPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.nsbPictureUrl = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.nsbPictureList.push(des)
              })
            } else {
              if (item.nsbPictureIds.startsWith("https")) {
                item.nsbPictureUrl = item.nsbPictureIds;
              }
              item.nsbPictureList.push(item.nsbPictureUrl)
            }
          }
          this.list.data.push(item)
        })
      }).catch(err => {

      })
      //根据任务编号查询缺陷隐患列表
      workOrderManagement.getTaskDefectList(this.row.taskNo).then(res => {
        this.list1.data = []
        this.list2.data = []
        res.data.map(item => {
          if (item.isHandle == 0) {
            item.isHandle = '未处理'
          } else if (item.isHandle == 1) {
            item.isHandle = '已处理'
          }
          if (item.afterPictureIds && item.afterPictureIds.length > 10) {
            item.afterPictureList = []
            if (item.afterPictureIds.indexOf(',') !== -1) {
              var arr = item.afterPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.afterPictureSrc = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.afterPictureList.push(des)
              })
            } else {
              if (item.afterPictureIds.startsWith("https")) {
                item.afterPictureSrc = item.afterPictureIds;
              }
              item.afterPictureList.push(item.afterPictureSrc)
            }
          }
          if (item.equipDefectType === '1') {
            this.list1.data.push(item)
          } else {
            this.list2.data.push(item)
          }
        })
      }).catch(err => {

      })
      //已处理缺陷隐患列表
      workOrderManagement.getTaskHandleDefectList(this.row.taskNo).then(res => {
        this.list3.data = []
        res.data.map(item => {
          if (item.afterPictureIds && item.afterPictureIds.length > 10) {
            item.srcHistoryList = []
            if (item.afterPictureIds.indexOf(',') !== -1) {
              var arr = item.afterPictureIds.split(',')
              if (arr[0].startsWith("https")) {
                item.afterPictureSrc = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.srcHistoryList.push(des)
              })
            } else {
              if (item.afterPictureIds.startsWith("https")) {
                item.afterPictureSrc = item.afterPictureIds;
              }
              item.srcHistoryList.push(item.afterPictureSrc)
            }
          }
          this.list3.data.push(item)
        })
      }).catch(err => {

      })
      //电量采集信息
      workOrderManagement.getElectricityCollectionData(this.row.taskNo).then(res => {
        this.list4.data = []
        res.data.map(item => {
          if (item.electricityPic && item.electricityPic.length > 10) {
            item.srcHistoryList = []
            if (item.electricityPic.indexOf(',') !== -1) {
              var arr = item.electricityPic.split(',')
              if (arr[0].startsWith("https")) {
                item.afterPictureSrc = arr[0];
              }
              arr.map(des => {
                if (des.startsWith("https")) {
                  des = des;
                }
                item.srcHistoryList.push(des)
              })
            } else {
              if (item.electricityPic.startsWith("https")) {
                item.afterPictureSrc = item.electricityPic;
              }
              item.srcHistoryList.push(item.afterPictureSrc)
            }
          }
          this.list4.data.push(item)
        })
        console.log(this.list4.data)
      }).catch(err => {

      })
    },

    //编辑渲染
    initData() {

    },
    handleRemove(file) {
      console.log(file);
    },
    handlePictureCardPreview() {

    },
    handleDownload(file) {
      console.log(file);
    },

    //确定
    handleSubmit() {
      this.$refs.ruleForm.validate((valid) => {
        if (valid) {
          var bool = true
          if (this.list1.data.length > 0) {
            this.list1.data.map(item => {
              if (item.defectStatusCode === '1') {
                bool = false
              }
            })
          }
          if (this.list2.data.length > 0) {
            this.list2.data.map(item => {
              if (item.defectStatusCode === '1') {
                bool = false
              }
            })
          }
          if (bool) {
            const queryParam = Object.assign({}, this.ruleForm)

            const params = [{
              id: this.row.id,
              ptaskStatusNo: '99',
              ...queryParam,
            }]
            workOrderManagement.updateData(params).then(res => {
              if (res.code === '200') {
                this.$message.success('评价成功')
                this.handleCancel()
                this.$emit('onSearch')
                this.dialogProps.visible = false;
              }

            }).catch(err => {


            })
          } else {
            this.$message.warning('请审核完缺陷隐患后，才可以质量评价')
          }
        } else {
          return false;
        }
      });
    },
    //取消
    handleCancel() {
      this.$refs.ruleForm.resetFields()
      // for (const k in this.form.data) {
      //   this.form.data[k] = ''
      // }
      this.list = {
        data: [],
      }
      this.row = {}
      this.dialogProps.visible = false;
    },
    //确定关闭
    handleClose(done) {
      this.dialogProps.visible = false;
      this.titleAction = 1


    },
    handleClick(row, type) {
      if (type === 1) {
        row.defectStatusCode = '2'
        row.defectStatusName = '审核通过'
      } else {
        row.defectStatusCode = '3'
        row.defectStatusName = '审核不通过'
      }
      workOrderManagement.updateDefect([row]).then(res => {
        workOrderManagement.getTaskDefectList(this.row.taskNo).then(res => {
          this.list2.data = res.data
        }).catch(err => {

        })
      })
    },
    appraiseStatusChange(value) {
      this.ruleForm.appraiseStatusName = '';
      if (value) {
        let arr = this.appraiseStatusOptions.filter(item => {
          return item.value == value;
        })
        if (arr && arr.length > 0) {
          this.ruleForm.appraiseStatusName = arr[0].label;
        }
      }
      if (value == '2') {
        this.appraiseContentShow = true
      } else {
        this.appraiseContentShow = false
      }

    }
  },
};

</script>
<style>
.changeTitle {
  margin-left: 10px;
  font-size: large;
  cursor: pointer;
}

.linkBox {
  width: 7%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(170, 170, 170, 1);
  border-radius: 10px;
  padding: 10px 5px;
  position: fixed;
  bottom: 50%;
  left: 0;
}

.iclass {
  border: 1px solid rgba(215, 215, 215, 1);
  color: #333;
  list-style: none;
}

.iclass:hover {
  background: rgba(231, 241, 253, 1);
}

.active {
  list-style: none;
  color: #0e867f;
  border: 1px solid rgba(215, 215, 215, 1);
  background: rgba(231, 241, 253, 1);
}

.maodianFont {
  height: 54px;
  line-height: 34px;
  font-size: 18px;
  text-decoration: none;
  font-family: '微软雅黑';
  color: #333;
}

.maodianFont:hover {
  color: #0e867f;
}

.activeFont {
  height: 54px;
  line-height: 34px;
  font-size: 18px;
  text-decoration: none;
  font-family: '微软雅黑';
  color: #0e867f;
}

.formBox {
  width: 92%;
  margin-left: 8%;
}

.steps {
  padding: 0 20px;
}

.formtop {
  margin-bottom: 10px;
}

.formcenter {
  width: 100%;
  height: 34px;
  line-height: 34px;
  color: #fff;
  border-radius: 4px;
  background: #009688;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;

}

.formbottom {
  border-left: 2px solid #b0dbe1;
  border-right: 2px solid #b0dbe1;
  border-bottom: 2px solid #b0dbe1;
  background: #b0dbe129;
  padding: 10px;

}

.textwidth {
  padding-left: 10px;
  width: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image {
  width: 208px;
  display: block;
  height: 150px;
}
</style>

